From: Colin Walters Date: Tue, 9 Jan 2018 15:22:50 +0000 (-0500) Subject: grub2: Exit gracefully if there's no system ostree repository X-Git-Tag: archive/raspbian/2022.1-3+rpi1~1^2~4^2~27^2~16 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=2c2e6799bed208306dba600c8a2de813660ffd93;p=ostree.git grub2: Exit gracefully if there's no system ostree repository Apparently there testing systems that literally install *all* packages. Having `ostree-grub2` currently causes grub2 to fail on a non-ostree managed system. Let's just gracefully exit if there's no system repository. https://bugzilla.redhat.com/show_bug.cgi?id=1532668 Closes: #1399 Approved by: jlebon --- diff --git a/src/boot/grub2/grub2-15_ostree b/src/boot/grub2/grub2-15_ostree index dfff6e89..0b9bf930 100644 --- a/src/boot/grub2/grub2-15_ostree +++ b/src/boot/grub2/grub2-15_ostree @@ -17,10 +17,14 @@ # Free Software Foundation, Inc., 59 Temple Place, Suite 330, # Boston, MA 02111-1307, USA. -# Gracefully exit if ostree is not installed +# Gracefully exit if ostree is not installed, or there's +# no system repository initialized. if ! which ostree >/dev/null 2>/dev/null; then exit 0 fi +if ! test -d /ostree/repo; then + exit 0 +fi # Make sure we're in the right environment if ! test -n "${GRUB_DEVICE}"; then